package mathMethod;

public class SumSolution {

    /**
     * JZ47 求1+2+3+4+...+n
     * @param args
     */
    public static void main(String[] args) {
        SumSolution s = new SumSolution();
    }

    public int Sum_Solution(int n) {
        int sum = (int)Math.pow(n, 2) + n;
        return sum >> 1;
    }
}
